package com.fg.estate.util;

import org.apache.commons.codec.digest.DigestUtils;

import java.util.UUID;

/**
 * @author 丰哥
 * 2022/10/13
 *
 * 文件工具类
 */
public class SecurityUils {

    // 获得盐
    public static String getSalt() {
        String uuid = UUID.randomUUID().toString();
        String salt = uuid.replace("-", "");
        return salt;
    }

    public static String getMD5Password(String password, String salt) {
        return DigestUtils.md5Hex(password + salt);
    }
}
